package com.codejob.portal.entity.job;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.codejob.portal.entity.IdEntity;
import com.codejob.portal.entity.user.Users;

@Entity
@Table(name = "job_careers")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Careers extends IdEntity {
	private String title;
	
	private String content;
	
	private Integer look;
	
	private Date createTime;
	
	private Users user;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(length=10000)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="userId")
	public Users getUser() {
		return user;
	}

	public void setUser(Users user) {
		this.user = user;
	}

	public Integer getLook() {
		return look;
	}

	public void setLook(Integer look) {
		this.look = look;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
		
}
